package com.example.leo.mycharmingstudent.a0914;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Leo on 2020/9/14.
 */

public class SimpleStudentEntityParcelable implements Parcelable {

    private String name;
    private String sex;
    private String age;
    private String weight;
    private String height;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.sex);
        dest.writeString(this.age);
        dest.writeString(this.weight);
        dest.writeString(this.height);
    }

    public SimpleStudentEntityParcelable() {
    }

    protected SimpleStudentEntityParcelable(Parcel in) {
        this.name = in.readString();
        this.sex = in.readString();
        this.age = in.readString();
        this.weight = in.readString();
        this.height = in.readString();
    }

    public static final Parcelable.Creator<SimpleStudentEntityParcelable> CREATOR = new Parcelable.Creator<SimpleStudentEntityParcelable>() {
        @Override
        public SimpleStudentEntityParcelable createFromParcel(Parcel source) {
            return new SimpleStudentEntityParcelable(source);
        }

        @Override
        public SimpleStudentEntityParcelable[] newArray(int size) {
            return new SimpleStudentEntityParcelable[size];
        }
    };
}
